import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { HoverDirective } from './diretive/hover.directive';
import { LifecycleComponent } from './components/lifecycle/lifecycle.component';
import { FormComponent } from './components/form/form.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { Form2Component } from './components/form2/form2.component'

// @NgModule(NgModule metadata) 声明模块

@NgModule({
  // 声明有哪些组件（组件模板在模块内才能进行编译）
  declarations: [
    AppComponent,
    HoverDirective,
    LifecycleComponent,
    FormComponent,
    Form2Component
  ],
  // 当前模块依赖项
  imports: [
    BrowserModule,
    SharedModule,
    FormsModule,
    ReactiveFormsModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
